-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor! #153
Refactor! #153
Conversation
54d5fba
to
803b97f
Compare
2ddd692
to
32c4606
Compare
Not sure why inlining changes the behavior of the parser, but `_top_level` has to be inlined, otherwise everything breaks.
- Remove `type_clause` rule - Remove `type_parameter_list` aliases - Update and organize tests for type definitions - Add query patterns for `where_expression` and subtyping operators
- Simplify `signature` definition - Remove `return_type` and `where_clause` hacks
- Arrow functions cannot contain open tuples, so they should only allow closed assignments (like `let_statement`). - Rename `function_expression` to `arrow_function_expression`.
Parse the start of block_comment as a regular token.
Parse the start of a string as a regular token, and then parse the content of the string using the external tokenizer. This requires rules for all types of content (string/command, normal/raw, single/triple), but it doesn't require using the external tokenizer to serialize string delimiters.
- Remove unnecessary newlines from `_comprehension_clause` and `matrix_expression`. - Update definition of `_terminator`. Co-authored-by: Imran Khan <[email protected]>
- Rename `addDots` to `addDot`. - Move `token` call to `addDot` definition.
- Add `public_statement` - Split import rule into `import_statement` and `using_statement`
All types of content are aliased as content. Query patterns will usually need to include the parent rule anyways. Since the alias only includes content tokenized by the scanner, escape sequences are _not_ included. Co-authored-by: MichaelHatherly <[email protected]>
Inside raw strings, only escaped delimiters and \\ are considered escape sequences. Other backslashes are treated as regular characters.
Fuzzer has a timeout error, but the tests are fine. We ball. |
It breaks ALL THE QUERIES (in nvim-treesitter) ;) Please PR! |
Yes, this release includes breaking changes, detailed in the queries we track here. I mentioned I'm now only using the queries in this repo to ensure they work, and because I got tired of Neovim crashing and never pointing out the actual error in the queries :/ |
I'm sorry to hear that (not least because that is an unfair complaint); it seems like this will mean that Julia will no longer be tier 1 parser (and eventually dropped) in Neovim. |
This patch adapts the julia queries to the breaking changes in tree-sitter/tree-sitter-julia#153. fixes nvim-treesitter#716
This patch adapts the julia queries to the breaking changes in tree-sitter/tree-sitter-julia#153. fixes #716
This patch fixes the julia `(string_literal)` injection queries after the breaking changes in tree-sitter/tree-sitter-julia#153. The queries are simplified by the fact that string content is now directly available as a separate `(content)` child node.
This patch fixes the julia `(string_literal)` injection queries after the breaking changes in tree-sitter/tree-sitter-julia#153. The queries are simplified by the fact that string content is now directly available as a separate `(content)` child node.
This fixes the macro identifier highlight query after the breaking changes in tree-sitter/tree-sitter-julia#153. See also tree-sitter/tree-sitter-julia@9f2fb3b.
This fixes the macro identifier highlight query after the breaking changes in tree-sitter/tree-sitter-julia#153. See also tree-sitter/tree-sitter-julia@9f2fb3b.
Various changes based on the lezer-julia rewrite.
_top_level
rule_top_level
breaks the parser, which is probably a tree-sitter bug, because inlining shouldn't affect the semantics of the grammar.type_head
rulefor
andstruct
grammar with headers? #142signature
rulefor_binding
operators visiblefunction_expression
toarrow_function_expression
arrow_function_expression
allowing assignments with open tuplesa -> a = 2, 3
parsed as a lambda expression instead of a tuple #151block_comment
public_statement
import_statement
andusing_statement
Notes for downstream:
The way type definitions are parsed now probably breaks existing
locals.scm
, and makes querying type name more complicated. The only upside is that patterns written fortype_head
apply to all abstract/primitive/struct definitions.